package xjson

import (
	jsoniter "github.com/json-iterator/go"
	"github.com/json-iterator/go/extra"
)

var default_json = jsoniter.ConfigCompatibleWithStandardLibrary

var (
	Marshal   = default_json.Marshal
	Unmarshal = default_json.Unmarshal
)

func RegisterFuzzyDecoders() {
	extra.RegisterFuzzyDecoders()
	jsoniter.RegisterTypeDecoder("bool", &fuzzyBoolDecoder{})
}

//func Marshal(v interface{}) ([]byte, error) {
//	return default_json.Marshal(v)
//}
//
//func Unmarshal(data []byte, v interface{}) error {
//	return default_json.Unmarshal(data, v)
//}

//func NewEncoder(writer io.Writer) *jsoniter.Encoder{
//	return default_json.NewEncoder(writer)
//}
//
//func NewDecoder(reader io.Reader) *jsoniter.Decoder{
//	return default_json.NewDecoder(reader)
//}
